//KY132 xxx定律
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        int count=0;
        if(n!=0)
        {
            int x =n;
            while(x!=1)
            {
                if(x%2==0)
                    x=x/2;
                else
                    x=(x*3+1)/2;
                count++;
            }
            printf("%d\n",count);
        }
        else
            break;
    } 
    return 0;
}